package org.sssc2009.guessxcess.client;

import java.io.Serializable;

import com.extjs.gxt.ui.client.data.BaseTreeModel;
import com.extjs.gxt.ui.client.data.ModelData;

public class Individual extends BaseTreeModel implements Serializable {

	private static final long serialVersionUID = -1518147681870892010L;
	private static int ID = 0;

	public Individual(String name) {
		set("id", ID++);
		set("name", name);
	}

	public String toString() {
		return getName();
	};

	public Integer getId() {
		return (Integer) get("id");
	}

	public String getName() {
		return (String) get("name");
	}
	
	@Override
	public void add(ModelData child) {
		throw new UnsupportedOperationException("This is a child node");
	}
}
